#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QReadqss.h>
#include <QToolButton>
#include <QPushButton>
#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QSpacerItem>
#include <QMouseEvent>
#include <QEvent>
#include <QListWidget>
#include <QListWidgetItem>
#include <QToolBox>
#include "QWidgetofpreview.h"
#include <QGridLayout>


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    QWidget *WidgetOfWindowsTitleBar;
    QToolButton *CloseBtn;
    QPushButton *MaximizeBtn;
    QToolButton *MinimizeBtn;
    QHBoxLayout *LayoutOfWindowsTitleBar;
    QVBoxLayout *LayoutOfAll;
    QSpacerItem *horizontalSpacer;
    QSpacerItem *verticalSpacer;
    QWidget *CenterWidget;
    QWidget *WidgetOfcontent;
    QToolButton *BtnOfLOGO;
    QToolButton *BtnOfBack;
    QToolButton *BtnOfRefer;
    QWidget *WidgetOfResearch;
    QLineEdit *LineeditOfResearch;
    QToolButton *BtnOfResearch;
    QToolButton *BtnOfHistory;
    QToolButton *BtnOfLover;
    QToolButton *BtnOfMine;
    QToolButton *BtnOfCalendar;
    QToolButton *BtnOfMessage;
    QWidget *WidgetOfProgramList;
    QWidget *WidgetOfProgramVect;
    QHBoxLayout *LayoutOfContent;
    QToolBox *ToolBoxOfProgramList;
    QToolButton *BtnOfLiveBroadcast;
    QVBoxLayout *LayoutOfProgramList;

    QWidget *WIdgetOfToolBoxPage1;
    QWidget *WIdgetOfToolBoxPage2;
    QVBoxLayout *LayoutOfUserCenter;
    QPushButton *BtnOfUserCenter;
    QPushButton *BtnOfUserHistory;
    QPushButton *BtnOfUserLove;
    QPushButton *BtnOfUserMoney;
    QPushButton *BtnOfUserOeder;
    QPushButton *BtnOfUserBroadCastCenter;
    QPushButton *BtnOfUserSecuritycenter;
    QWidget *WidgetOfListMine;

    QVBoxLayout *LayoutOfLiveBroadcastClassification;//布局管理
    QPushButton *BtnOfTheLastLive;//最新开播
    QPushButton *BtnOfTheHotestLive;//热门直播
    QPushButton *BtnOfPhoneGames;//手游
    QPushButton *BtnOfWebGames;//网游
    QPushButton *BtnOfPCGames;//单机游戏
    QPushButton *BtnOfDailyLife;//日常生活
    QPushButton *BtnOfentertainment;//娱乐
    QPushButton *BtnOfRadioStation;//电台
    QPushButton *BtnOfVirtualAnchor;//虚拟主播




protected:
    bool eventFilter(QObject *obj, QEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
private:
    bool mDrag;             //是否在拖动
    QPoint mDragPos;        //拖动起始点
    bool mIsMax;            //当前是否最大化

public slots:
    void SLOTFunOfMaximize();
};

#endif // MAINWINDOW_H
